$(function () {
   obj.init();
});
var obj = new function () {
    'use strict';
    return {
        form:null,
        init:function () {

            this.listener();
        },
        listener:function () {
            var $this = this;
            $('.tab-bar a').click(function () {
                $this.funObj().tabClick($(this));
            })
        },
        funObj:function () {
            var $this = this;
            return {
                tabClick:function (target) {
                    var $id = target.attr('href');
                    var frame = $($id).find('iframe');
                    if (frame.length > 0) {
                        $this.currentFrame = frame;
                        var name = frame.attr('name');
                        var src = frame.attr('src');
                        if (!src) {
                            if (name == 'regular') {
                                frame.attr('src', baseUrl + 'hrm/mine/regularList');
                            } else if (name == 'transfer') {
                                frame.attr('src', baseUrl + 'hrm/mine/transferList');
                            } else if (name == 'dismiss') {
                                frame.attr('src', baseUrl + 'hrm/mine/dismissList');
                            } else {
                                return false;
                            }
                        }
                    }
                }
            }
        }
    }
};